package cn.mazexal.exambg.common.models;

/**
 * SQL 保留关键字枚举
 * @author aoe
 * @date 2020/8/3
 */
public enum SqlKeywordEnum {

    AND("AND", "AND"),
    OR("OR", "OR"),
    IN("IN", "IN"),
    NOT("NOT", "NOT"),
    LIKE("LIKE", "LIKE"),
    EQ(StringPool.EQUALS, "EQ"),
    NE("<>", "NE"),
    GT(StringPool.RIGHT_CHEV, "GT"),
    GE(">=", "GE"),
    LT(StringPool.LEFT_CHEV, "LT"),
    LE("<=", "LE"),
    IS_NULL("IS NULL", "IS_NULL"),
    IS_NOT_NULL("IS NOT NULL", "IS_NOT_NULL"),
    GROUP_BY("GROUP BY", "GROUP_BY"),
    HAVING("HAVING", "HAVING"),
    ORDER_BY("ORDER BY", "ORDER_BY"),
    EXISTS("EXISTS", "EXISTS"),
    BETWEEN("BETWEEN", "BETWEEN"),
    ASC("ASC", "ASC"),
    DESC("DESC", "DESC");

    private final String keyword;
    private final String tag;

    SqlKeywordEnum(final String keyword, String tag) {
        this.keyword = keyword;
        this.tag = tag;
    }

    public String keyword() {
        return keyword;
    }

    public String tag() {
        return tag;
    }
}
